<?php echo $this->render('./_common/header.phtml');?>
<script type="text/javascript" src="<?php echo $this->baseUrl();?>/public/default/js/nicEdit-latest.js"></script>
<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script>  
<script type="text/javascript">
/* Code based on Google Map APIv3 Tutorials */
var gmapdata;
var gmapmarker;
var infoWindow;

var def_zoomval = 15;
var def_longval = <?php echo $this->longval;?>;
var def_latval = <?php echo $this->latval;?>;

function if_gmap_init()
{
	// init for Editor
	nicEdit = new nicEditor({buttonList : ['fontSize','bold','italic','underline','strikeThrough','subscript','superscript','html','image']}).panelInstance('placeDescription');
	nicEdit.removeInstance('placeDescription');
	
	// init for Map
	document.getElementById("addressInput").value = '<?php echo $this->locname;?>';
	var curpoint = new google.maps.LatLng(def_latval,def_longval);

	gmapdata = new google.maps.Map(document.getElementById("mapitems"), {
		center: curpoint,
		zoom: def_zoomval,
		mapTypeId: 'roadmap'
		});

	gmapmarker = new google.maps.Marker({
					map: gmapdata,
					position: curpoint
				});	

	return false;
} // end of if_gmap_init

</script>
<div class="container bigtoppadding midtoppadding">
	<section class="row midbottompadding bigtoppadding">
		<h5 class="black whitetext bold leftpadding rightpadding">Xem địa
			điểm trên VnSpot.Net</h5>
	</section>
</div>
<div class="container white bigpadding">
	<section class="row">
		<div class="eight columns blackvertical">	
		<div id="mapitems" style="width: 600px; height: 350px"></div>
<!-- 			<div class="map-frame" id="map"><span class="loading"></span></div> -->
		</div>
		<div class="four columns">
			<div class="row">
			<form action="">
				<dl class="field twelve columns">
					<dd> <label> Tên địa điểm của bạn : </label></dd>
					<dt class="text">
						<input type="text" readonly="readonly" name="locname" id="addressInput" value="<?php echo $this->locname;?>" placeholder="Vui lòng nhập lại tên địa điểm"/>
					</dt>
				</dl>
				<dl class="field twelve columns">
							<dd>
								<label>Ảnh : </label>
							</dd>
							<dt>
								<img class="five columns push_one" src="<?php echo $this->baseUrl().'/'.$this->photo;?>" alt="<?php echo $this->locname;?>" title="<?php echo $this->locname;?>" />
							</dt>
				</dl>
				<dl class="field twelve columns">
							<dd>
								<label>Mô tả địa điểm : </label>
							</dd>
							<dt>							
							<textarea style="width: 100%" readonly="readonly" name="description" id="placeDescription" placeholder="Mô tả cho địa điểm này" title="Mô tả cho địa điểm này" ><?php echo $this->description;?></textarea>
							</dt>
						</dl>
						<?php if($this->displaybtnedit == 1) {?>
						<dl class="field twelve columns">
						<dt>
						<a href="<?php echo $this->baseUrl()."/place/edit/id/".$this->id;?>" class="button" >Sửa địa điểm này</a>
						</dt>
						</dl>
						<?php }?>
			</form>
			</div>
		</div>		
	</section>
<section class="row midpadding">
<h5 class="blacktext extrabold midbottommargin">Danh sách địa điểm mới nhất trên VnSpot.Net</h5>
<?php 
for($i=0; $i<count($this->arrListPlace); $i++) {
if((($i+1)%4) == 1) {
?>
<div class="three columns alpha">
	<ul class="meta leftpadding">
		<li class="blacktext icon-hand-right"> &nbsp; <a href="<?php echo $this->baseUrl()."/place/view/id/".$this->arrListPlace[$i]['Id'];?>"><?php echo $this->arrListPlace[$i]['Name'];?></a></li>
	</ul>
</div>
<?php
} else {
?>
<div class="three columns">
	<ul class="meta leftpadding">
		<li class="blacktext icon-hand-right">&nbsp; <a href="<?php echo $this->baseUrl()."/place/view/id/".$this->arrListPlace[$i]['Id'];?>"><?php echo $this->arrListPlace[$i]['Name'];?></a></li>
	</ul>
</div>
<?php 
}
}?>
</section>

</div>
<!-- end of #container -->

<?php echo $this->render('./_common/footer.phtml');?>